export const filePathTransform = (path: string = '') => path.replace(/(^public|\\)/g, '/');

export function computedNO(index: number, pageIndex: number, pageSize: number) {
    return (pageIndex - 1) * pageSize + index + 1;
}

export function objToFormData(v: object){
    const formData = new FormData();
    for (const key in v) {
        // @ts-ignore
        formData.append(key, v[key]);
    }
    return formData;
}